package com.fy.tt.util;

import com.bls.constant.ResultCodeEnum;
import com.bls.exception.MyException;
import com.fy.tt.Executor;
import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.misc.ParseCancellationException;

//重写错误监听方法
public class ThrowingErrorListener extends BaseErrorListener {

    public static final ThrowingErrorListener INSTANCE = new ThrowingErrorListener();

    @Override
    public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
        // xiaoliang 高级设计，凡人勿扰
        Executor.errFlag = true;
    }
}